import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('进度条演示')),
        body: Center(
          child: Padding(
            padding: EdgeInsets.all(16.0),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                // 环形进度条
                SizedBox(
                  width: 120.0,
                  height: 120.0,
                  child: CircularProgressIndicator(
                    backgroundColor: Colors.grey[200],
                    valueColor: AlwaysStoppedAnimation(Colors.blue),
                    strokeWidth: 8.0,
                  ),
                ),
                SizedBox(height: 32.0),
                
                // 线性进度条
                Container(
                  width: 300.0,
                  child: LinearProgressIndicator(
                    backgroundColor: Colors.grey[200],
                    valueColor: AlwaysStoppedAnimation(Colors.green),
                    minHeight: 12.0, // 控制线性进度条的高度
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
